package cn.iocoder.an.module.business.dal.mysql.producttablemapping;

import java.util.*;

import cn.iocoder.an.framework.common.pojo.PageResult;
import cn.iocoder.an.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.an.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.an.module.business.dal.dataobject.producttablemapping.ProductTableMappingDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.an.module.business.controller.admin.producttablemapping.vo.*;

/**
 * 产品表名映射 Mapper
 *
 * @author 超级管理员
 */
@Mapper
public interface ProductTableMappingMapper extends BaseMapperX<ProductTableMappingDO> {

    default PageResult<ProductTableMappingDO> selectPage(ProductTableMappingPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<ProductTableMappingDO>()
                .likeIfPresent(ProductTableMappingDO::getTableName, reqVO.getTableName())
                .likeIfPresent(ProductTableMappingDO::getType, reqVO.getType())
                .orderByDesc(ProductTableMappingDO::getTableName));
    }

}